<div class="container forget-pwd-container" [@fadeIn]>
    <div class="panel panel-default">
        <div class="panel-heading">
            <h3 class="panel-title">找回密码</h3>
        </div>
        <div class="panel-body">
            <form *ngIf="!message" class="form-horizontal" #form="ngForm" (ngSubmit)="form.form.valid && sendValidationEmail()" role="form" novalidate>
                <div class="form-group" [ngClass]="{'has-error': form.submitted && !email.valid}">
                    <label class="col-sm-2 control-label">邮箱：</label>
                    <div class="col-sm-10">
                        <input required pattern="^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+((\.[a-zA-Z0-9_-]{2,3}){1,2})$" #email="ngModel" [(ngModel)]="user.email" name="email"  type="email" class="form-control" placeholder="注册时使用的邮箱">
                        <div *ngIf="form.submitted && !email.valid" class="text-danger">请输入注册时使用的邮箱。</div>
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-offset-2 col-sm-10">
                        <button type="submit" class="btn btn-success">发送验证邮件</button>
                    </div>
                </div>
            </form>
            <div *ngIf="message" class="alert alert-{{messgeType}}">{{message}}</div>
        </div>
    </div>
</div>
